import { getToken } from '@/utils/auth';

const getters = {
  // 页面整体布局信息
  sidebar: (state) => state.app.sidebar,
  language: (state) => state.app.language,
  size: (state) => state.app.size,
  table_height: (state) => state.app.table_height + 30,

  // 页面标签
  visitedViews: (state) => state.tagsView.visitedViews,
  cachedViews: (state) => state.tagsView.cachedViews,

  // 用户信息
  userInfo: (state) => state.user.userInfo,
  userId: (state) => state.user.userId,
  userRole: (state) => state.user.userRole,
  relationRoleId: (state) => state.user.relationRoleId,
  detailRole: (state) => state.user.detailRole,
  isRemind: (state) => state.user.isRemind,
  unReadCount: (state) => state.user.unReadCount,
  unCallPoliceCount: (state) => state.user.unCallPoliceMsgCount,
  hasCollectorRole: (state) => state.user.hasCollectorRole,
  token: (state) => state.user.token,
  getAccessToken: (state) => state.user.token,
  name: (state) => state.user.name,
  roles: (state) => state.user.roles,
  userList: (state) => state.user.userList,
  tenantList: (state) => state.user.tenantList,
  tenantId: (state) => state.user.tenantId,
  tenantName: (state) => state.user.tenantName,
  status: (state) => state.user.status,

  setting: (state) => state.user.setting,
  avatar: (state) => state.user.avatar,
  introduction: (state) => state.user.introduction,

  // 菜单权限
  permission_routers: (state) => state.permission.routers,
  addRouters: (state) => state.permission.addRouters,

  // 错误日志
  errorLogs: (state) => state.errorLog.logs,
};
export default getters;
